package com.zhentao.nlz.project.product;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 部门表
 * @TableName t_dept
 */
@TableName(value ="t_dept")
@Data
//@Repository
@Mapper
public class TDept implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer deptId;

    /**
     * 名称
     */
    private String name;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;

    /**
     * 是否删除标记
     */
    @TableLogic(value = "0",delval = "1")
    private String delFlag;

    /**
     * 父亲id
     */
    private Integer parentId;

    /**
     * 租户id
     */
    private Integer tenantId;
    @TableField(exist = false)
    private String tenantName;
    @TableField(exist = false)
    private List<TDept> children;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}